#include<stdio.h>
#include<malloc.h>

int main()
{
    int a,n;
    int *pa=&a,*pn=&n,*temp;
    temp=(int*)malloc(sizeof(int));
    scanf("a=%d,n=%d",pa,pn);
    for(int i=1;i<=n;i++){
        *temp=i;
        while(*temp)
        {
            printf("%d",*pa);
            (*temp)=*(temp)-1;
        }
        printf("\n");
    }
}